package factory;

/**
 * @Author: linKe
 * @Date: 2022/1/15 10:34
 * @FileName: NewYorkPizzaStore
 * @version: 1.0
 * @Description: 描述
 */
public class NewYorkPizzaStore extends PizzaStore{
    private PizzaIngredientFactory factory = new NewYorkIngredientFactory();

    @Override
    protected Pizza createPizza(String type) {
        if("cheese".equals(type)) {
            pizza = new CheesePizza(factory);
            pizza.name = "New York Cheese Pizza";
        }else if("sauce".equals(type)) {
            pizza = new SaucePizza(factory);
            pizza.name = "New York Sauce Pizza";
        }
        return pizza;
    }
}
